#ifndef __PWM_H
#define __PWM_H
#include "sys.h"

void PWM_init(u16 arr,u16 psc);
void PID_Speed_Calc(int Motor);

extern unsigned char PWM1Control;
extern unsigned char TIM1Flag;
extern unsigned char PWM1Reverse;
extern float e[4],e1[4],e2[4];
extern float duk[4],uk[4],uk1[4],out[4];
extern float Kp[4];
extern float Ki[4];
extern float Kd[4];
extern u16 PWM1_Max;
extern u16 PWM1_Min;
extern u16 Actual_Output[4],PWM1_value[4];

#endif
